#根据输入的日期判断是当年的的第几天。
months=[31,28,31,30,31,30,31,31,30,31,30,31]
year = int(input("请输入年："))
month = int(input("请输入月："))
day = int(input("请输入日："))
if year % 4 ==0 and year % 100 != 0 or year % 400 == 0:
    months[1]=29
if month == 1:
    print("是第",day,"天")
else:
    print("是第",sum(months[:month-1])+day,"天")